// 引入主包依赖

import App from './App';
import store from "./store";
import share from './utils/share';
import BhTabbarfooter from './components/custom_views/bh-tabbarfooter.vue';
import BhTabbarfooternew from './components/custom_views/bh-tabbarfooternew.vue';
import { commonMixin } from "./components/custom_views/mixin";
import { Api } from "./api/api";
import { Dict } from "./components/custom_views/dict";
import { CustomDict } from "./components/custom_views/custom_dict";
import BhTitle from './components/custom_views/bh-title.vue'
import check_utils from "./components/custom_views/check_utils";
import { showCustomModalMixin } from "./components/custom_views/show-custom-modal-mixin";
import showCustomModal from './components/custom_views/show-custom-modal.vue'
import { showCustomTipsMixin } from "./components/custom_views/show-custom-tips-mixin";
import BhWaveloading from './components/custom_views/bh-waveloading.vue';


// import './uni.promisify.adaptor';

import showCustomTips from './components/custom_views/show-custom-tips.vue';

// #ifndef VUE3
import Vue from 'vue';
import './uni.promisify.adaptor';
import VueCompositionAPI from "@vue/composition-api";
Vue.use(VueCompositionAPI);
Vue.config.productionTip = false;
App.mpType = 'app';
const app = new Vue({
  ...App,
});
app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue';
export function createApp() {
  const app = createSSRApp(App);
  // 统一的全局api变量---this.$Api.xxx   统一的前端对接的接口信息，内部会调 Cust_Request.js 请求后台数据
  app.config.globalProperties.$Api = Api
  // 统一的全局字典变量---this.$Dict.xxx。Dict.js 是通过后台的label标签管理功能，通过后台生成。不能手动更改。
  app.config.globalProperties.$Dict = Dict
  // 统一的自定义全局字典变量----this.$CustomDict.xxx  自定义的常量信息，字典信息。
  app.config.globalProperties.$CustomDict = CustomDict
  // 统一的校验工具方法
  app.config.globalProperties.$CheckUtils = check_utils
  
  app.use(store)
  // 统一的分享mixin
  // app.mixin(share)
  // 统一的公共mixin，
  app.mixin(commonMixin)
  // 统一的自定义modal
  app.mixin(showCustomModalMixin)
  app.mixin(showCustomTipsMixin)
  app.component('showCustomModal', showCustomModal)
  app.component('showCustomTips', showCustomTips)
  app.component('BhTitle', BhTitle)
  app.component('BhTabbarfooter', BhTabbarfooter);
  app.component('BhTabbarfooternew', BhTabbarfooternew)
  app.component('BhWaveloading', BhWaveloading)
  return {
    app,
  };
}
// #endif